package com.matrix.java.chap_04;

import java.util.Scanner;

/*
    学生的专业和状况
 */
public class Ex4_18 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("Enter two characters: ");
        String characters = input.next();
        String subject = "";
        String semester = "";
        switch (characters.charAt(0)) {
            case 'M':
                subject = "数学";
                break;
            case 'C':
                subject = "计算机";
                break;
            case 'I':
                subject = "信息技术";
                break;
            default:
                System.out.println("Invalid input");
        }
        switch (characters.charAt(1)) {
            case '1':
                semester = "大一";
                break;
            case '2':
                semester = "大二";
                break;
            case '3':
                semester = "大三";
                break;
            case '4':
                semester = "大四";
                break;
            default:
                System.out.println("Invalid input");
        }
        System.out.println(subject+semester);
        input.close();
    }
}
